Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(trivy): Bump to support v0.55.2 #387

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

simar7
Copy link
Member

@simar7 simar7 commented Sep 17, 2024

No description provided.

@simar7 simar7 changed the title feat(trivy): Bump to support v0.55.1 feat(trivy): Bump to support v0.55.2 Sep 17, 2024
@simar7
Copy link
Member Author

simar7 commented Sep 17, 2024

@nikpivkin any idea why the tests are red in the CI? Locally I don't see any failures.

 BATS_LIB_PATH=/opt/homebrew/lib TRIVY_DISABLE_VEX_NOTICE=true bats -r -T .
./test/test.bats
 ✓ trivy repo with securityCheck secret only [1000]
 ✓ trivy image [1000]
 ✓ trivy config sarif report [1000]
 ✓ trivy config [1000]
 ✓ trivy rootfs [1000]
 ✓ trivy fs [1000]
 ✓ trivy image with trivyIgnores option [1000]
 ✓ trivy image with sbom output [1000]
 ✓ trivy image with trivy.yaml config [1000]
 ✓ trivy image with custom docker-host [1000]
 ✓ trivy config with terraform variables [1000]

11 tests, 0 failures in 12 seconds

@nikpivkin
Copy link
Contributor

@simar7 The tests use the trivy-checks bundle snapshot stored in this repository, but running the tests locally uses checks from the Trivy cache, so the test result is different. I will open a separate PR with an update to the Makefile to make the local test run consistent with CI.

This is the difference in local run on the main branch:

✗ trivy config sarif report [607]
   (from function `assert_files_equal' in file /opt/homebrew/lib/bats-file/src/file.bash, line 266,
    from function `compare_files' in file ./test/test.bats, line 54,
    in test file ./test/test.bats, line 72)
     `compare_files config-sarif.sarif ./test/data/config-sarif-report/report.sarif' failed
   Building SARIF report with options:  ./test/data/config-sarif-report/main.tf
   3c3
   <   "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
   ---
   >   "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
   3c3
   <   "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
   ---
   >   "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
   
   -- files are not the same --
   path : config-sarif.sarif
   path : ./test/data/config-sarif-report/report.sarif
   --

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants